#ifndef CUBESHADER_H
#define CUBESHADER_H

#include "baseshader.h"
#include <QMatrix4x4>
#include <QOpenGLTexture>
#include "data.h"
#include "mymodel.h"

struct SQOpenGLTexture
{
    unsigned int meshId;
    unsigned int id;
    QOpenGLTexture* t;
};

class CubeShader : public BaseShader
{
    Q_OBJECT
public:
    CubeShader(QObject *parent = Q_NULLPTR);
    virtual void initializeGL();
    virtual void paintGL();

    float vertices[288];
    QMatrix4x4 projection;
    QMatrix4x4 view;
    QMatrix4x4 model;
    QVector3D viewPos;
    QVector3D lightColor;
    QVector3D pos;
    QVector3D dir;

private:
    GLuint aPos;
    GLuint aNormal;
    GLuint aTexCoords;

//    GLuint vao;
//    GLuint vbo;
//    GLuint ebo;
    vector<GLuint> vaos;

    QOpenGLTexture *m_texture;
    QOpenGLTexture *m_texture2;
    MyModel* ourModel;

    vector<SQOpenGLTexture> myTextures;
    QStringList texturePathBacks;
};

#endif // CUBESHADER_H
